
/**
 * @brief    Includes default for single point constraints.
 *
 * @version  0.1
 * @author   wanglong
 * @date     2025.03.07
 *          _
 *      ___| |__   ___ _ __   __ _  ___  _ __   __ _
 *     / __| '_ \ / _ \ '_ \ / _` |/ _ \| '_ \ / _` |
 *     \__ \ | | |  __/ | | | (_| | (_) | | | | (_| |
 *     |___/_| |_|\___|_| |_|\__, |\___/|_| |_|\__, |
 *                           |___/             |___/
 * @copyright (c) 2024 by 神工仿真, All Rights Reserved.
 */
#pragma once
#include <map>
#include <unordered_map>

#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Common/SGObject.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN

struct IndexMappingData
{
    SG::DataStructure::Common::I64 GIndex      = 0;
    SG::DataStructure::Common::I64 DOFIndex[6] = { -1 };

    IndexMappingData () = default;

    IndexMappingData (SG::DataStructure::Common::I64 GIndex, std::vector<SG::DataStructure::Common::I64> DOFIndex) : GIndex (GIndex)
    {
        for (std::size_t i = 0; i < DOFIndex.size (); i++)
        {
            this->DOFIndex[i] = DOFIndex[i];
        }
        for (size_t i = DOFIndex.size (); i < 6; i++)
        {
            this->DOFIndex[i] = -1;
        }
    }
};

using IndexMapping = std::unordered_map<SG::DataStructure::Common::I64, std::vector<SG::DataStructure::Common::I64>>;

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE
